package com.xinzhi.service.impl;

import com.xinzhi.dao.LoginUserDao;
import com.xinzhi.pojo.User;
import com.xinzhi.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class StartImpl {
    @Autowired
    private LoginUserDao loginUserDao;


    public Result isnull(String phone){
        if (phone == null) {
            return Result.error("手机号不能为空");
        }
        User login = loginUserDao.login(phone);
        if (login == null){
            return Result.error("用户不存在");
        }
        return Result.ok("跳转登录页面");
    }

}
